<%@LANGUAGE="VBSCRIPT" CODEPAGE="65001"%>
<!--#include file="ClassFun.asp"-->
<%sortType=Request.QueryString("sortType")
call chkAdmin("|10") %>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<title>添加栏目</title>
<meta http-equiv=Content-Type content="text/html; charset=utf-8">
<link rel="stylesheet" type="text/css" id="css" href="images/style.css">
<link rel="stylesheet" href="../ZKeditor/themes/default/default.css" />
<link rel="stylesheet" href="../ZKeditor/plugins/code/prettify.css" />
<script type="text/javascript" src="../js/jquery-1.7.2.min.js"></script>
<script type="text/javascript" src="js/pinyin.js"></script>
<script type="text/javascript" src="../ZKeditor/kindeditor.js"></script>
<script type="text/javascript" src="../ZKeditor/plugins/code/prettify.js"></script>
<script type="text/javascript" src="js/pinyin.js"></script>
<script>
KindEditor.ready(function(K) {
    var editor = K.create('textarea[name="content"]', {
        cssPath : '../ZKeditor/plugins/code/prettify.css',
        uploadJson : '../ZKeditor/asp/upload_json.asp',
        fileManagerJson : '../ZKeditor/asp/file_manager_json.asp',
        allowFileManager : true,
        afterCreate : function() {
            var self = this;
            K.ctrl(document, 13, function() {
                self.sync();
                K('form[name=add]')[0].submit();
            });
            K.ctrl(self.edit.doc, 13, function() {
                self.sync();
                K('form[name=add]')[0].submit();
            });
	K('#insertHtml').click(function(e) {
		editor.insertHtml('[==华==丽==的==分==页==码==]');
	});
        },
		afterBlur: function(){this.sync();}
		
    });
    prettyPrint();

});

</script>
<style type="text/css">
body,td,th {font-family: "Microsoft YaHei", Arial, "宋体";}
</style>
</head>
<body>
<form name="add" action="?action=add" method="post" >
<table width="100%" border="0" align="center" cellpadding="0" cellspacing="1" bgcolor="#CCCCCC">
  <tr>
    <td height="30" class="topnav"><div>添加分类</div></td>
  </tr>
  <tr>
    <td bgcolor="#FFFFFF">
    <table width="100%" border="0" align="center" cellpadding="5" cellspacing="0" class="stable" >
  <tr>						
    <td width="130" height=25 align="right" class="td">栏目名称</td>
    <td  class="td"><input class="inp" style="WIDTH:200px" maxlength="200" name="SortName" id="sortname" onBlur="Sorthtml.value=($('#sortname').toPinyin());" onChange="Sorthtml.value=($('#sortname').toPinyin())" onKeydown="Sorthtml.value=($('#sortname').toPinyin())"/> <font color=#ff0000>*</font> </td>
  </tr>
 <tr>
    <td align="right" height=25 class="td">分类英文</td>    
    <td class="td"><input name="Sorthtml" class="inp" style="width:200px" value="" maxlength="200"/> <font color=#ff0000>*</font>顶级栏目时作为静态目录</td>
</tr>
  <tr>
    <td class="td" align="right" height=25>顶级分类</td>    
    <td class="td"><%LoadSelect "ParentID","zych_Type","SortName","SortID",getForm("id","get"), 0,"order by px_id","顶级栏目",0,"onChange=""sethtml(ParentID.value)"""%></td>
</tr>
  <tr>
    <td class="td" align="right" height=25>类属模型</td>    
    <td class="td"><%=makesorttyperadio("sortType",2,getsorttype(getForm("id","get"))," on")%> 模型选择后不可更改
</td>
</tr>
  <tr>
    <td class="td" align="right" height=25>外部链接</td>
    <td class="td"><input class="inp" maxlength="200" style="WIDTH:300px" name="SortURL"/> 注：留言链接"/Message/?1-1.html"</td>
  </tr>
   
<tr>
    <td class="td" align="right" height=25>顶部导航</td>
    <td class="td"><label class="inp"><input class="checkbox" type="checkbox" checked="checked" name="menu" value="1"/>  显示到顶部导航</label></td>
</tr>
  
<tr>
    <td class="td" align="right" height=41>分页/排序</td>
    <td class="td"><input class="inp" maxlength="6" value="10" style="WIDTH: 60px" name="Page"/> /<input class="inp" maxlength="6" value="99" style="WIDTH: 60px" name="px_id"/>单页设置可忽略此项</td>
</tr>
    <tr>
    <td class="td" align=right width=100 height=25>频道模型</td>
    <td class="td"><select class="sel" onChange="Temp.value=this.value">
	<option value="">选择或填写</option>
	 <%
       Set FSO=Server.CreateObject("Scripting.FileSystemObject")
       Set ServerFolder=FSO.GetFolder(Server.MapPath(zych_templatedir))
       Set ServerFolderList=ServerFolder.Files
       For Each ServerFileEvery IN ServerFolderList
	   filename=ServerFileEvery.Name
	   if instr(filename,"c_")>0 then
	   tbody=ReadFromTextFile(zych_templatedir&filename&"","utf-8")
	   if instr(tbody,"<!--##")>0 then filetitle=split(tbody,"##")(1) else filetitle=filename%>
	<option value="<%=filename%>"><%=filetitle%></option>
    <% end if
	 Next %>
	</select><input type="text" id="Temp" class="inp" name="Temp" value="c_Type.asp"/></td>
    </tr>
    <tr>
    <td class="td" align=right width=100 height=25>内容模型</td>
    <td class="td"><select class="sel" onChange="sTemp.value=this.value">
	<option value="">选择或填写</option>
	 <%
       Set FSO=Server.CreateObject("Scripting.FileSystemObject")
       Set ServerFolder=FSO.GetFolder(Server.MapPath(zych_templatedir))
       Set ServerFolderList=ServerFolder.Files
       For Each ServerFileEvery IN ServerFolderList
	   filename=ServerFileEvery.Name
	   if instr(ServerFileEvery.Name,"d_")>0 then
	   tbody=ReadFromTextFile(zych_templatedir&filename&"","utf-8")
	   if instr(tbody,"<!--##")>0 then filetitle=split(tbody,"##")(1) else filetitle=filename%>
	<option value="<%=filename%>"><%=filetitle%></option>
    <% end if
	 Next %>
	</select><input type="text" id="sTemp" class="inp" name="sTemp" value="d_show.asp"/></td>
    </tr>
<tr>
    <td class="td" align="right" height=25>开启状态</td>
    <td class="td"><label class="inp"><input class="checkbox" type="checkbox" checked="checked" name="isok" value="1"/>是否开通</label></td>
</tr>
<tr>
    <td class="td" align="right" height=25>页面标题</td>
    <td class="td"> <input class="inp" maxlength="200" style="WIDTH:450px"  name="PageTitle"/>  </td>
</tr>
 <tr>
    <td class="td" align="right" height=25>关键词</td>
    <td class="td"> <input class="inp" maxlength="200" style="WIDTH:450px"  name="PageKeywords"/>  </td>
  </tr>
<tr>
    <td class="td" align="right" height=25>页面描述</td>
    <td class="td">  <textarea class="tex" style="WIDTH: 450px" name="PageDesc" rows="3" ></textarea></td>
</tr>

<tr>
    <td class="td" align="right" height="30">详情内容<br><a href="javascript:void(0)" id="insertHtml">插入分页</a></td>
    <td class="td"><textarea  name="content" id="content" rows="3"  style="width:750px; height:300px"></textarea></td>
</tr>
  
<tr>
  <td height="25" align="right" class="td">&nbsp;</td>
  <td class="td"><input class="btn" type="submit" value=" 添 加 " />&nbsp;&nbsp;<input class="btn" type="button" value=" 返 回 " onClick="history.go(-1)"/> &nbsp;&nbsp;</td>
</tr>
    </table>
</td>
  </tr>
</table></form>
<%call Footer%>
</body>
</html>